//import java.util.Scanner;
//
//public class Main {
//    public static void main(String[] args) {
////        int k=0;
////        for (int i = 1; i <=100 ; i++) {
////            if(i%10==9){
////                k++;
////                System.out.println(i);
////            }
////
////        }
////        System.out.println(k);
//        Scanner num = new Scanner(System.in);
//        int number = num.nextInt();
//        for (int i = 2; i < number; i++) {
//            if (number % i == 0) {
//                System.out.println("不是素数");
//                continue;
//            }
//            System.out.println("素数");
//        }
//
//    }
//}
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个数字：");
        int number = scanner.nextInt();

        boolean isPrime = true;

        if (number <= 1) {
            isPrime = false;
        } else {
            for (int i = 2; i <= Math.sqrt(number); i++) {
                if (number % i == 0) {
                    isPrime = false;
                    break;
                }
            }
        }

        if (isPrime) {
            System.out.println(number + " 是素数");
        } else {
            System.out.println(number + " 不是素数");
        }
    }
}